public class test {
    public static boolean func(int[]array){
        int count=0;
        for (int i = 0; i <array.length ; i++) {
            if(array[i]%2!=0){
                count++;
            }
            else{
                count=0;
            }
            while(count==3){
                return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        int[] array={2,8,9,15,66,50,99,23,21,54};
        System.out.println(func(array));
    }
}
